<template>
  <div class="shop-item">
    <img :src="shop.path" alt="" />
    <div class="info">
      <div class="name">
        <b>{{ shop.name }}</b
        ><button>收藏店铺</button>
      </div>
      <div class="attention">119人关注</div>
      <div class="detailed">
        <div class="item">关注<span>345</span></div>
        <div class="item">新品<span>23</span></div>
        <div class="item">促销<span>23</span></div>
      </div>
    </div>
  </div>
</template>

<script>
import api from "@/api";
export default {
  name: "GoodsItem1",
  props: {
    shop: Object,
  },
  methods: {
    shopSollection() {
      api
        .SHOPS_COLLECTION({ shop_id: this.goods.shop_id, status: 1 })
        .then(() => {
          this.$emit("refresh");
        });
    },
  },
};
</script>

<style lang="scss" scoped>
.shop-item {
  width: 587px;
  height: 134px;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 5px;
  margin-left: 20px;
  margin-bottom: 20px;
  display: inline-block;
  position: relative;
  &:hover {
    border: 1px solid #d52c1a;
    .add-car {
      display: flex;
    }
  }
  img {
    width: 94px;
    height: 94px;
    border-radius: 2px;
    padding: 20px;
    float: left;
  }
  .info {
    padding-top: 20px;
    .name {
      display: flex;
      align-items: center;
      b {
        font-size: 18px;
        font-weight: 600;
        color: #333333;
        line-height: 25px;
      }
      button {
        margin-left: 20px;
        width: 120px;
        box-sizing: border-box;
        height: 28px;
        background: #d52c1a;
        border-radius: 5px;
        border: 1px solid #d52c1a;
        color: #fff;
      }
    }
    .attention {
      padding: 10px 0;
      font-size: 16px;
      font-weight: 400;
      color: #999999;
      line-height: 22px;
    }
    .detailed {
      font-size: 0;
      font-weight: 400;
      color: #666666;
      line-height: 22px;
      .item {
        font-size: 16px;
        display: inline-block;
        margin-left: 20px;
        &:first-child {
          margin-left: 0;
        }
        span {
          padding-left: 10px;
          color: #dc2c1a;
        }
      }
    }
  }
}
</style>
